package com.antony.messageUser1014;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.Socket;
import java.util.ArrayList;

public class UserInfo {
	private String user;
	private Socket sk;
	private ArrayList<String> friList;
	private DataOutputStream dout;
	private BufferedReader br;
	
	public UserInfo(String user,Socket sk){
		this.user = user;
		this.sk = sk;
	}
	
	public void setFriList(){
		try {
			InputStream in = sk.getInputStream();
			OutputStream out = sk.getOutputStream();
			DataOutputStream dout = new DataOutputStream(out);
			br = new BufferedReader(new InputStreamReader(in));
			dout.writeChars("getFriList");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public void getMsg() throws IOException{
		while(true){
			String getMsg = br.readLine();
			String[] temp = getMsg.split("\\|");
		}
	}
	
	public ArrayList<String> getFriList(){
		return friList;
	}
}
